from SOAPpy import WSDL
import os
import sys
def getMacAddress():
    if sys.platform == 'win32':
        for line in os.popen("ipconfig /all"):
            if line.lstrip().startswith('Physical Address'):
                mac = line.split(':')[1].strip().replace('-',':')
                break
    else:
        for line in os.popen("/sbin/ifconfig"):
            if line.find('Ether') > -1:
                mac = line.split()[4]
                break
    return mac

wsdlFile = 'http://panic.c3p0.ger.ufsc.br:8888/soap.php?wsdl'
server = WSDL.Proxy(wsdlFile)

# metodo retirado, mas fica como exemplo
#arg1 = {'dia': 12, 'mes' : 'abril' , 'ano': 2001}
#arg2 = { 'carro' : "ka", 'tipo' : "ford", 'segurado': 0}
#print server.retorna_nao_array(arg1, arg2)

# autenticacao
mac = getMacAddress()
email = 'daniel.smpf@hotmail.com'

print server.methods
server.auth('00:11:2F:AE:BE:B0','arthur@npd.ufsc.br')

